home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Printing / Errors / PrintingError.h < prev   
Text File  |  2000-06-23  |  380b  |  24 lines

  1. // PrintingError.h
  2.  
  3. #ifndef PrintingError_h
  4. #define PrintingError_h
  5.  
  6. #ifndef OSError_h
  7. #include "OSError.h"
  8. #endif
  9.  
  10. class PrintingError: public OSError
  11.   {
  12.     public:
  13.         explicit PrintingError( OSErr e )    : OSError( e )        {}
  14.         PrintingError( OSError& e )            : OSError( e )        {}
  15.   };
  16.  
  17. inline void ThrowPrintingError( OSErr e )
  18.   {
  19.     if ( e != noErr )
  20.         throw PrintingError(e);
  21.   }
  22.  
  23. #endif
  24.